/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package etherblocks.engine.network.messages;

import com.jme3.network.AbstractMessage;
import com.jme3.network.serializing.Serializer;
import etherblocks.game.entitysystem.components.*;

/**
 *
 * @author Carl
 */
public class NetworkMessage extends AbstractMessage{

    public NetworkMessage(){
        
    }
    protected boolean isBroadcastRequired = false;
    
    @Override
    public boolean isReliable(){
        return true;
    }

    public boolean isBroadcastRequired(){
        return isBroadcastRequired;
    }
    
    public static void initializeSerializers(){
        Serializer.registerClasses(
            Message_BlockChunk.class,
            Message_BlockCommand.class,
            Message_BlockEvent.class,
            Message_BlockRemoveEvent.class,
            Message_BlockRemoveCommand.class,
            Message_BlockSetEvent.class,
            Message_BlockSetCommand.class,
            Message_ClientConnection.class,
            Message_Command.class,
            Message_ConnectionFinished.class,
            Message_ConnectionSuccessful.class,
            Message_Entity.class,
            Message_EntityAdded.class,
            Message_EntityComponent.class,
            Message_EntityComponentAdded.class,
            Message_EntityComponentRemoved.class,
            Message_EntityRemoved.class,
                AnimationComponent.class,
                BlockSetCollisionComponent.class,
                BoxCollisionShapeComponent.class,
                CapsuleCollisionShapeComponent.class,
                LocationComponent.class,
                MoveDirectionComponent.class,
                PhysicsComponent.class,
                RemovedComponent.class,
                RemoveRequestComponent.class,
                RotationComponent.class,
                VisualComponent.class,
            Message_Player.class,
            Message_PlayerState.class,
            Message_Request.class,
            Message_SimpleRequest.class
        );
    }
}
